import React from 'react';
import { connect } from 'dva';
import style from '../styles/IndexPage.css';
import {Link} from 'dva/router'
import PropTypes from 'prop-types';
import {Layout,Button} from 'antd';
import Nav from './IndexPage/Nav';

const {Header, Content, Footer} = Layout
class IndexPage extends React.Component{
  render(){
    let _crmuser=null;
    if(localStorage['crmuser'] == undefined||null){
      _crmuser = <div><Link>用户</Link><Link>注册</Link></div>;
    }else{
      _crmuser = <Dropdown>
        <span>{localStorage['crmuser']}</span><Icon type="down" />
      </Dropdown>
      console.log(2);
    }
    return (
      <Layout style={{background:'#fff',height:'100%'}}>
        <Nav  style={{background:'#404040'}} id="nav_0_0" key="nav_0_0" />
          <Layout>
            {this.props.children}
          </Layout>
      </Layout>
    );
  }
}



export default connect()(IndexPage);
